Frames No Frames Cognitoware API v2009512
Cognitoware.Robotics.dll
Cognitoware.Mathematics.Probability.Discrete

Class DistributionCounter<T>
T: The type of the values whose probabilities are represented in the distribution.

System.Object


Summary

A discrete distribution that simply counts obseravations of each value.

Constructor Summary

DistributionCounter()

Method Summary

AddObservation(T)
Adds one to the count for value t.
AliasAs()
Inherited from Cognitoware.Mathematics.Probability.RandomDistribution
Equals(Object)
Inherited from System.Object
Finalize()
Inherited from System.Object
GetEntropy()
Inherited from Cognitoware.Mathematics.Probability.Discrete.DiscreteDistribution
GetEntropy(IEnumerable<T>)
Inherited from Cognitoware.Mathematics.Probability.RandomDistribution
GetHashCode()
Inherited from System.Object
GetType()
Inherited from System.Object
MemberwiseClone()
Inherited from System.Object
ProbabilityOf(T)
Returns the count of the specificed value divided by the sum of all counts.
Sample(Random)
Selects a random value from the distribution with a probability consistent with the distribution.
ToString()
Inherited from System.Object

Details

A discrete distribution that simply counts obseravations of each value.

Constructor Details

public DistributionCounter()

Method Details

public void AddObservation(T t)
Adds one to the count for value t.

Parameters:

t - The observed value to count.

public override Double ProbabilityOf(T t)
Returns the count of the specificed value divided by the sum of all counts.

Parameters:

t - The value whose probability is returned.

Returns:

The probability of t.

public override T Sample(Random select)
Selects a random value from the distribution with a probability consistent with the distribution.

Parameters:

select - A random number generator used to select the value.

Returns:

A value of T.


Questions, Comments and Licensing
Copyright 2009 Cognitoware. All rights reserved.